<template>
  <div class="loading">
    <div>
      <div class="icon">
        <span></span>
      </div>
      <div class="text">加载中</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'loading'
  }
</script>
<style>
  @keyframes loading {
    0% {
      height: 28px;
    }
    33.3% {
      height: 50px;
    }
    66.6% {
      height: 82px;
    }
    100% {
      height: 28px;
    }
  }
</style>
<style lang="less" scoped>
  .loading {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    .icon {
      width: 95px;
      height: 82px;
      display: flex;
      align-items: flex-end;
      span {
        width: 100%;
        height: 28px;
        display: block;
        background: url("../../../../assets/icon-loading.png") bottom center no-repeat;
        background-size: 100%;
        animation: loading 1s infinite step-end;
      }
    }
    .text {
      margin-top: 6px;
      text-align: center;
      color: #d93035;
      font-size: 26px; /* px */
    }
  }
</style>
